package org.news.web.domain.bo;

import org.news.web.domain.Subscriptions;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 订阅功能业务对象 subscriptions
 *
 * @author Gu Ci
 * @date 2024-04-21
 */
@Data
@AutoMapper(target = Subscriptions.class, reverseConvertGenerate = false)
public class SubscriptionsBo{

    /**
     * 订阅ID
     */
    @NotNull(message = "订阅ID不能为空", groups = { EditGroup.class })
    private Long subscriptionId;

    /**
     * 订阅者ID
     */
    @NotNull(message = "订阅者ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long subscriberId;

    /**
     * 订阅状态：订阅是作者还是栏目
     */
    @NotNull(message = "订阅状态：订阅是作者还是栏目不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;

    private String username;

    /**
     * 目标栏目ID
     */
    @NotNull(message = "目标栏目ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long targetCategoryId;

    /**
     * 记录订阅时间
     */
    private Date creationTime;


}
